import React, { useState, useEffect } from 'react';
import { Button } from 'antd-mobile';
import { getUser } from "@/api";
import { Input} from 'antd';
const { Search } = Input;
import { DatePickerView } from 'antd-mobile';
import enUs from 'antd-mobile/lib/date-picker-view/locale/en_US';
import { DatePicker, Space } from 'antd';
const { RangePicker } = DatePicker;

getUser().then(res => {
  console.log(res)
})


function Home() {

  const [user, setUser] = useState('');
  useEffect(() => {
    getUser().then(user => {
      setUser(user.name);
    })
  }, [user]);
  return (
    <div>
      <Search placeholder="请输入搜索内容"  style={{ }} />
      <RangePicker
      showTime={{ format: 'HH:mm' }}
      format="YYYY-MM-DD HH:mm"
    />

    
      <a href={`//${user}`} target="_blank">{user}</a>
      <p className="base-font">基础字体大小</p>
      <p className="base-font-vw">对比字体大小</p>
    </div>
  )
}



export default Home;